home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / os2 / srefv12i.zip / freeup.cmd < prev    next >
OS/2 REXX Batch file  |  1997-03-31  |  2KB  |  73 lines

  1. /*  Free up queues created by GoServe */
  2.  
  3. Say "  Free up queues created by SRE-Filter (ver 1.2) "
  4. say " "
  5. say "Do NOT run this program if GoServe (using SRE-Filter) is still running!"
  6. say "(it is meant to be run AFTER you shut GoServe down) "
  7. say " "
  8. say " What port did you run GoServe on (default=80)"
  9. parse pull aport
  10. if aport="" then aport=80
  11.  
  12. foo=rxqueue('d','SREF_'||aport||'_VIRTUAL')
  13. say "virtual queue: " foo
  14. foo=rxqueue('d','SREF_'||aport||'_ACCESS')
  15. say "access queue: " foo
  16. foo=rxqueue('d','SREF_'||aport||'_POSTF')
  17. say "POSTFILTER queue: " foo
  18. foo=rxqueue('d','SREF_'||aport||'_USER')
  19. say "USER queue: " foo
  20. foo=rxqueue('d','SREF_'||aport||'_ALIAS')
  21. SAY " ALIAS queue: " FOO
  22.  
  23. do mm=1 to 40   /* delete too many */
  24.   aname="SREF_"||aport||"_t"||mm
  25.   foo=rxqueue('d',aname)
  26.   say " filter-instance queue: " aname foo
  27. /*  aname2="\SEM32\SREF_"||aport||"_t"mm
  28.   foo=eventsem_close(aname2)
  29.   say "sem " aname2 foo */
  30. end /* do */
  31.  
  32. say "Queue cleanup is done! "
  33.  
  34. say " Clear macrospace now? "
  35. say "  ...... caution: this might remove procedures used by other programs) ?"
  36. say " Enter 1 for YES, 0 for NO "
  37. parse pull ok
  38.      if ok=1 then do
  39.         foo=macroclear()
  40.         say "  SRE-Filter routines removed from macrospace .."
  41.      end  /* Do */
  42.  
  43. exit
  44.  
  45.  
  46. /* -------------------- */
  47. /* get a yes or no , return 1 if yes */
  48. yesno:procedure expose normal reverse bold
  49. parse arg fooa , allopt,altans
  50. if altans<>" " & words(altans)>1 then do
  51.    w1=strip(word(altans,1))
  52.    w2=strip(word(altans,2))
  53.    a1=left(w1,1) ; a2=left(w2,1)
  54.    a1a=substr(w1,2) ; a2a=substr(w2,2)
  55. end
  56. else do
  57.     a1='Y' ; a1a='es'
  58.     a2='N' ; a2a='o'
  59. end  /* Do */
  60. ayn='  '||bold||a1||normal||a1a||'\'||bold||a2||normal||a2a
  61. if allopt=1 then  ayn=ayn||'\'||bold||'A'||normal||'ll'
  62.  
  63. do forever
  64.  foo1=normal||reverse||fooa||normal||ayn
  65.  call charout,  foo1 normal ':'
  66.  pull anans
  67.  if abbrev(anans,a1)=1 then return 1
  68.  if abbrev(anans,a2)=1 then return 0
  69.  if allopt=1 & abbrev(anans,'A')=1 then return 2
  70. end
  71.  
  72.  
  73.